﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class TiendasFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As TiendasBE
        Dim tmpTiendas As TiendasBE = New TiendasBE()
        Try
            With tmpTiendas
                .Calle = convertDTFromDb.ConvertString(dr.Item("Calle"))
                .Ciudad = convertDTFromDb.ConvertString(dr.Item("Ciudad"))
                .Colonia = convertDTFromDb.ConvertString(dr.Item("Colonia"))
                .CP = convertDTFromDb.ConvertString(dr.Item("CP"))
                .EAN = convertDTFromDb.ConvertString(dr.Item("EAN"))
                .Estado = convertDTFromDb.ConvertString(dr.Item("Estado"))
                .IdCliente = convertDTFromDb.ConvertString(dr.Item("IdCliente"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Identificador = convertDTFromDb.ConvertString(dr.Item("Identificador"))
                .IdTienda = convertDTFromDb.convertInt32(dr.Item("IdTiendo"))
                .NoInt = convertDTFromDb.ConvertString(dr.Item("NoInt"))
                .Nombre = convertDTFromDb.ConvertString(dr.Item("Nombre"))
                .Numero = convertDTFromDb.convertInt32(dr.Item("Numero"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
            End With
            Return tmpTiendas
        Catch ex As Exception
            Throw
        Finally
            tmpTiendas = Nothing
        End Try
    End Function
End Class
